﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;

namespace PHMEE
{
    public class OrderCreatedEventHandler : IDistributedEventHandler<OrderCreatedEto>,
          ITransientDependency
    {
        private readonly ICompanyRepository companyRepository;

        public OrderCreatedEventHandler(ICompanyRepository companyRepository)
        {
            this.companyRepository = companyRepository;
        }
        public Task HandleEventAsync(OrderCreatedEto eventData)
        {
            return Task.Run(() =>
             {
                 Console.WriteLine($"Order {eventData.OrderName} has been processed by lulifa.");
             });
        }
    }
}
